package com.example.dynamicdata.controller;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.dynamicdata.dao.CategoryMapper;
import com.example.dynamicdata.entity.Category;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * @description:
 * @author: lw
 * @create: 2024-01-15 00:40
 **/
@RestController
@RequiredArgsConstructor
public class CategoryController {

    private final CategoryMapper categoryService;
    @DS("second")
    @GetMapping(value = "/ss")
    public Category productOrderReport( @RequestParam("id") Integer id) {
        Category category = categoryService.selectById(id);
        return category;
    }
    @GetMapping(value = "/sss")
    public Category productOrder( @RequestParam("id") Integer id) {
        Category category = categoryService.selectById(id);
        return category;
    }

    @GetMapping(value = "/test")
    public String productOrderReport() {

        return "1234";
    }


}
